home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Media Design Review 1999
/
Interactive Media Design Review 1999.iso
/
pc
/
Demos
/
Bombardier_PC
/
BSCRIPTS.CST
/
00175_Script_175
< prev
next >
Wrap
Text File
|
1999-04-25
|
16KB
|
550 lines
-- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
-- Developed for Bombardier, Inc.
--
-- All programming developed by:
-- Robert Fabricant, Valerie Valoueva, Ossi Shaked,
-- Henry Sauvageot, Chris Howell & Chris Girand
--
-- Use of this code by parties other than @radical.media, inc. or their
--agents
-- without the express written consent of @radical.media, inc. AND Concurrent
-- New Media Group, L.L.C. is strictly prohibited.
------------------------------------------------------
on getFile
set tFileIOName = "fileio"
set tFileIO=new(xtra tFileIOName)
openFile(tFileIO, "stones.txt", 1)
set tString = readFile(tFileIO)
closeFile(tFileIO)
put tString into member "baseMileStones"
end
on writeFile
set tFileIOName = "fileio"
set tFileIO=new(xtra tFileIOName)
put the text of member "baseMilestones" into tString
createFile(tFileIO, "stones.txt")
set tStatus = status(tFileIO)
if error(tFileIO,tStatus) = "File already exists" then
-- problem creating file ... it exists so delete it
openFile(tFileIO, "stones.txt", 0)
delete(tFileIO)
closeFile(tFileIO) -- just to make sure
createFile(tFileIO, "stones.txt")
set tStatus = status(tFileIO)
end if
if tStatus <> 0 then
-- problem creating file
alert("Problem creating the new file: " & "stones.txt")
abort
else
closeFile(tFileIO)
openFile(tFileIO, "stones.txt", 0)
writeString(tFileIO, tString)
closeFile(tFileIO)
end if
end
on StopIndexSystem
forget window "miles.dir"
forget window "index.dir"
end
on KeyDown
if the keyCode = 123 then
if windowPresent("small.dir") then tell window "small.dir" to keyPrevious
end if
if the keyCode = 124 then
if windowPresent("small.dir") then tell window "small.dir" to keyNext
end if
--if the controlDown then
if the keyCode = 34 then
LaunchIndex
end if
if the keyCode = 46 then
LaunchMilestone
end if
if the keyCode = 1 then
LaunchSmall
end if
if the controlDown then
if the keyCode = 47 then
quit
end if
end if
PASS
end
on LaunchIndex
global gCGIndex
--if gCGIndex <> 1 then
-- open window "index.dir"
set indexWindow to window "index.dir"
set the title of window "index.dir" to "INDEX"
set centreH to (the stageRight - the stageLeft)/2 + the stageLeft
set centreV to (the stageBottom - the stageTop)/2 + the stageTop
set alertW to 368
set alertH to 265
set alertLeft to centreH - alertW/2
set alertTop to centreV - alertH/2
put the stageleft into hNew
put the stageTop+191 into vNEw
put the stageLeft+368 into hBot
put the stageTop + 456 into vBot
set alertRect to rect(hNew,vNew,hBot,vBot)
set alertDrawRect to rect(0,0,alertW,alertH)
-- This uses the file "alert.d" in the current directory
set the rect of indexWindow to alertRect
set the drawRect of indexWindow to alertDrawRect -- may not need this
set the windowType of indexWindow = 4
open IndexWindow
set gCGIndex = 1
FixColors
--end if
end
on LaunchMileStone
set milesWindow to window "miles.dir"
set the title of window "miles.dir" to "MILESTONES"
set centreH to (the stageRight - the stageLeft)/2 + the stageLeft
set centreV to (the stageBottom - the stageTop)/2 + the stageTop
set alertW to 272
set alertH to 295
set alertLeft to centreH - alertW/2
set alertTop to centreV - alertH/2
put the stageleft+372 into hNew
put the stageTop+191 into vNEw
put hNew + 272 into hBot
put vNew + 295 into vBot
set alertRect to rect(hNew,vNew,hBot,vBot)
set alertDrawRect to rect(0,0,alertW,alertH)
-- This uses the file "alert.d" in the current directory
set the rect of milesWindow to alertRect
set the drawRect of milesWindow to alertDrawRect -- may not need this
set the windowType of milesWindow = 4
open milesWindow
end
on forgetSmall
global gCGSmall
put 0 into gCGSmall
forget window "Small.dir"
end
on LaunchSmall
global gCGSmall
if gCGSmall <> 1 then
set centreH to (the stageRight - the stageLeft)/2 + the stageLeft
set centreV to (the stageBottom - the stageTop)/2 + the stageTop
set alertW to 240
set alertH to 26
set alertLeft to centreH - alertW/2
set alertTop to centreV - alertH/2
put the stageRight - 240 into hNew
put the stageTop into vNEw
put the stageRight into hBot
put the stageTop + 26 into vBot
set alertRect to rect(hNew,vNew,hBot,vBot)
set alertDrawRect to rect(0,0,alertW,alertH)
set alertWindow to window "small.dir" -- This uses the file "alert.d" in the current directory
set the windowType of alertWindow to 2
-- set the modal of alertWindow to true
set the rect of alertWindow to alertRect
set the drawRect of alertWindow to alertDrawRect -- may not need this
-- set the visible of the stage to false
open alertWindow
set gCGSmall = 1
end if
end
on AddMilestone var
-- LaunchMileStone
--
-- ---put the recently chosen milestone into the stages field.
-- put the text of member "baseMilestones" into bob
-- put bob&RETURN&var into bob
-- put bob into member "baseMilestones"
--
-- ---change the color of the active Milestones inside the index movie.
-- FixColors
--
-- ---put the milestone in the milestone MIAW
-- tell window "miles.dir" to addStone var
--
-- --erase this later:
-- --put "adding milestone "&var into var
-- -- put var into member "words"
-- writeFile
end
on whatAreMileStones
put the text of member "baseMilestones" into var
tell window "miles.dir" to loadUp var
end
on updateList sourceVar
put sourceVar into member "baseMilestones"
end
on fixColors
---change the color of the active Milestones inside the index movie.
put the lineCount of member "baseMilestones" into var
put the text of member "baseMilestones" into BlueMe
if var > 0 then
put 1 into n
repeat while n <= var
put line n of BlueMe into ActiveString
tell window "index.dir" to changeColor ActiveString
put n+1 into n
end repeat
end if
end
on TakeAway var
put the text of member "baseMileStones" into sourceVar
put line var of sourceVar into checkForDoubles
delete line var of member "baseMileStones"
put the text of member "baseMileStones" into sourceVar
put the lineCount of member "baseMilestones" into theCount
put 1 into n
repeat while n <= theCount
if line n of sourceVar = checkForDoubles then
put 1 into dontErase
end if
put n+1 into n
end repeat
if voidP(dontErase) then Tell window "index.dir" to TurnBlack checkForDoubles
writeFile
end
on HopTo var
if var = "Business Aircraft Opening Screen" then
play movie "main.dir"
else
if var = "Business Aircraft Main Menu" then
play frame "startC" of movie "main.dir"
else
global gCurrentStone, gJumpFrame, gSpriteMilestone
put var into gCurrentStone
put 1 into s
repeat while s < 10
put "userNames"&string(s) into myTurn
put the text of member myTurn into sourceVar
put the lineCount of member myTurn into theCount
put 1 into n
repeat while n <= theCount
put line n of sourceVar into checkMe
if checkMe = gCurrentStone then
put "SpriteDestinations"&string(s) into SpriteTurn
put "MovieDestinations"&string(s) into MovieTurn
put the text of member SpriteTurn into SpriteVar
put the text of member MovieTurn into MovieVar
put line n of SpriteVar into SpriteVar
put line 1 of MovieVar into MovieVar
---SAME MOVIE
if the movieName = movieVar then
if char 4 of spriteVar = "" then
--main category
sendSprite(value(SpriteVar),#mouseUp)
sendSprite(value(SpriteVar),#mouseUp)
set the visibility of sprite 1 = 1
else
if char 1 of spriteVar = "1" then
--sub category with 3 digit spriteNumber
put char 1 to 3 of spriteVar into gSpriteMilestone
put length(spriteVar) into theCount
put char 4 to theCount of spriteVar into spriteVar
put string(spriteVar) into gJumpFrame
global gGoBoy
put 1 into gGoBoy
go to gJumpFrame
set the visibility of sprite 1 = 1
exit repeat
exit repeat
exit repeat
else
--sub category with 2 digit spriteNumber
put char 1 to 2 of spriteVar into gSpriteMilestone
put length(spriteVar) into theCount
put char 3 to theCount of spriteVar into spriteVar
put string(spriteVar) into gJumpFrame
global gGoBoy
put 1 into gGoBoy
go to gJumpFrame
set the visibility of sprite 1 = 1
exit repeat
exit repeat
exit repeat
end if
end if
end if
---DIFFERENT MOVIE
if the movieName <> movieVar then
if the movieName <> "main.dir" then
dataBaseThing 93, movieVar
end if
if char 4 of spriteVar = "" then
--main category listing in a different movie
global gSpriteMilestone
put value(SpriteVar) into gSpriteMilestone
play frame "jumpHere" of movie string(MovieVar)
else
if char 1 of spriteVar = "1" then
put char 1 to 3 of spriteVar into gSpriteMilestone
put length(spriteVar) into theCount
put char 4 to theCount of spriteVar into spriteVar
put string(spriteVar) into gJumpFrame
play frame "jumpHere" of movie string(MovieVar)
--put value(spriteVar) into var3
--dataBaseThing var3
exit repeat
exit repeat
exit repeat
else
put char 1 to 2 of spriteVar into gSpriteMilestone
put length(spriteVar) into theCount
put char 3 to theCount of spriteVar into spriteVar
put string(spriteVar) into gJumpFrame
play frame "jumpHere" of movie string(MovieVar)
--put value(spriteVar) into var3
--dataBaseThing var3
exit repeat
exit repeat
exit repeat
end if
end if
end if
exit repeat
else
put n+1 into n
end if
end repeat
put s+1 into s
end repeat
end if
end if
ResetTour
end
on SubCategoryFix
global gGoBoy, gJumpFrame, gSpriteMileStone
if gGoBoy = 1 then
set the updateLock = 1
sendSprite(value(gSpriteMileStone),#mouseUp)
go to gJumpFrame
set the updateLock = 0
put 0 into gGoBoy
put 0 into gjumpframe
end if
end
on previousStone
ResetTour
CLOSEMOVIE
global gActualItem, gCurrentStone, gCurrentMS
put the lineCount of member "baseMilestones" into theCount
put the text of member "baseMilestones" into sourceVar
if voidP(gActualItem) then
put 1 into gActualItem
-- put 1 into n
-- repeat while n <= theCount
-- put line n of sourceVar into checkVar
-- if checkVar = gCurrentstone then
-- put n+1 into gActualItem
-- end if
-- put n+1 into n
-- end repeat
-- if voidP(gCurrentStone) then
-- put 1 into gActualItem
-- end if
else
if gActualItem <> 1 then
put gActualItem - 1 into gActualItem
end if
end if
put line gActualItem of sourceVar into gCurrentStone
put gCurrentStone into gCurrentMS
hopTo gCurrentStone
end
on nextStone
ResetTour
CLOSEMOVIE
global gActualItem, gCurrentStone, gCurrentMS
put the lineCount of member "baseMilestones" into theCount
put the text of member "baseMilestones" into sourceVar
if voidP(gActualItem) then
put 1 into gActualItem
--
-- put 1 into n
-- repeat while n <= theCount
-- put line n of sourceVar into checkVar
-- if checkVar = gCurrentstone then
-- put n+1 into gActualItem
-- end if
-- put n+1 into n
-- end repeat
-- if voidP(gCurrentStone) then
-- put 1 into gActualItem
-- end if
else
if gActualItem <> theCount then
put gActualItem + 1 into gActualItem
end if
end if
put line gActualItem of sourceVar into gCurrentStone
put gCurrentStone into gCurrentMS
hopTo gCurrentStone
end
on dataBaseThing var, destinationMovie
if destinationMovie <> "bjs.dir" and destinationMovie <> "bombinc.dir" and destinationMovie <> "cs.dir" then
-- alert "Chris Howell's handler is being called!"
if var > 90 and var < 94 then
-- alert "hello"&&destinationMovie
initmovieplane destinationMovie
global currentChartName, cheraseflag, togglestate, compdrawplace
set compdrawplace = "specs"
set currentChartName = "ALL"
set the text of member "disPlane" = "No Competitor"
set xcastnum = ( the number of member "CHDBaircrafts" ) + 1
erasedatabasefields(xcastnum)
set xcastnum = ( the number of member "CHDBconfig" ) + 1
erasedatabasefields(xcastnum)
set xcastnum = ( the number of member "CHDBdaircrafts" ) + 1
erasedatabasefields(xcastnum)
set xcastnum = ( the number of member "CHDBdconfig" ) + 1
erasedatabasefields(xcastnum)
getaircrafts -- fill competitor popups
mainspecs
end if
end if
end
on initmovieplane destinationmovie
global CurrentPlane, cheraseflag
set tCurrentPlane = "Learjet 60"
if destinationmovie = "Global.dir" then set tCurrentPlane = "Global Express"
if destinationmovie = "Se.dir" then set tCurrentPlane = "Canadair SE"
if destinationmovie = "CH604.dir" then set tCurrentPlane = "Challenger 604"
if destinationmovie = "Lear31a.dir" then set tCurrentPlane = "Learjet 31a"
if destinationmovie = "Lear45.dir" then set tCurrentPlane = "Learjet 45"
if destinationmovie = "Lear60.dir" then set tCurrentPlane = "Learjet 60"
set cheraseflag = TRUE
set CurrentPlane = tCurrentPlane
end